cc.Class({
    extends: cc.Component,

    properties: {
        labelParent:{
            default:null,
            type:cc.Node
        },

        indexLabel:{
            default:null,
            type:cc.Label
        }
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {

    },

    // update (dt) {},

    initDealBoardItem:function (index,strs) {
        this.indexLabel.string = index
        for(let i=0;i<this.labelParent.children.length;i++){
            let labelNode = this.labelParent.children[i]
            if(strs[i] || strs[i] === 0){
                if(!labelNode.active) labelNode.active = true
                labelNode.getComponent(cc.Label).string = strs[i]
            }else {
                labelNode.active = false
            }
        }
    },
});
